## Example 3
def outer():
    x = 3
    def inner(y):
        z = x - 1
        r = (z + y)
        print ('r: %i' % r)
        return r

    x = inner(y)
    print ('x: %i' % x)
    return inner

i = outer()
i(2)
i(3)